package com.pay.common.enums.lianlian;

import org.apache.commons.lang3.StringUtils;

/**
 * Created by Administrator on 2018/12/18.
 */
public enum OidPartnerRsaEnum {
    //测试
    XINWANG_CS27("2018062100009027", "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAPD+malK2W3UJXfX5rO79gRUbLe+kwCskw7VzETXA4Qf/5VWlPxOb16SlflkE4zyInhGwehjUTvXPvebNtZJJpKS+Q/7oWw6hMQ1cIC99DWmV6Orjtz61Tmi5A/4QnYqUm2GRScfrnyILQw9/qikkvyjo0pPsIMT2rhmu31LSySNAgMBAAECgYEAokaubeKq2lu6ByLohCqTFINM2cWH8zJBrAGnFMu74GIzlfnBRMwEDiiiuFX9HDGHqHns5HDMKIFeMxjfKhgD0exp3S06xpSbmkIbvWLM+xBl70/+SLG7wztZ4KtdKu7PR26xJht6zM/KDrovuRzFYNB6ZbyO3My9CJXaZS6GU/kCQQD+/wsf0M7Byp+sPzy3SEn8katFopVOz8oESBBuSNNXl1rgyWfgVXBUKRDAus8oa/Nhx2zWNqpuchrHerPp5McHAkEA8fFyidW4nMkL3x4ULQmbsZBqsNEXoKv3fDDvHWRljX0AElel+XaVuxrtpYiDxwqFSM0s92nCBj2ZXt4O+d2eywJAS5mFzMr1YZMXP9QHxjcSaGUvqBeJuLH2LMrIxEmnDuL6uIY928643NrH8rvvywYmRCkB5YiTgucldVq1mHSRZQJAYny8+WrsqbYVhQ/DesnsfQ2iwLN9AMTAC+gHjlluFXiK7OyM/c3OCcpebwHxUrbvpsEOyvBcMRomMr4GLqSOnQJAcDKoXpkYFGakejn6LQj57EBtMgfVNatTipBnQxPaHMGGO9V9SzedbkgNg0NBSzsNsauKnFOy+yFwFqf6oGHm0A=="),
    XINWANG_CS03("2018062800003003", "MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAOilN4tR7HpNYvSBra/DzebemoAiGtGeaxa+qebx/O2YAdUFPI+xTKTX2ETyqSzGfbxXpmSax7tXOdoa3uyaFnhKRGRvLdq1kTSTu7q5s6gTryxVH2m62Py8Pw0sKcuuV0CxtxkrxUzGQN+QSxf+TyNAv5rYi/ayvsDgWdB3cRqbAgMBAAECgYEAj02d/jqTcO6UQspSY484GLsL7luTq4Vqr5L4cyKiSvQ0RLQ6DsUG0g+Gz0muPb9ymf5fp17UIyjioN+ma5WquncHGm6ElIuRv2jYbGOnl9q2cMyNsAZCiSWfR++op+6UZbzpoNDiYzeKbNUz6L1fJjzCt52w/RbkDncJd2mVDRkCQQD/Uz3QnrWfCeWmBbsAZVoM57n01k7hyLWmDMYoKh8vnzKjrWScDkaQ6qGTbPVL3x0EBoxgb/smnT6/A5XyB9bvAkEA6UKhP1KLi/ImaLFUgLvEvmbUrpzY2I1+jgdsoj9Bm4a8K+KROsnNAIvRsKNgJPWd64uuQntUFPKkcyfBV1MXFQJBAJGs3Mf6xYVIEE75VgiTyx0x2VdoLvmDmqBzCVxBLCnvmuToOU8QlhJ4zFdhA1OWqOdzFQSw34rYjMRPN24wKuECQEqpYhVzpWkA9BxUjli6QUo0feT6HUqLV7O8WqBAIQ7X/IkLdzLa/vwqxM6GLLMHzylixz9OXGZsGAkn83GxDdUCQA9+pQOitY0WranUHeZFKWAHZszSjtbe6wDAdiKdXCfig0/rOdxAODCbQrQs7PYy1ed8DuVQlHPwRGtokVGHATU="),

    //生产
    //光大
    GUANGDA("", ""),
    //新网
    XINWANG("2018112801159539", "MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAOwK9N8lQHXkJA8IxJwW9T2fgbB4G/JGEt7x4msab9je+qRRLp8qzPrsg0RIEhef66nJ0c4QQGBvpEb3Y82fAlkPXYUOF7+X3iNFSE89JhiHVqMreAw0ez1qygTl8HunNw8fQzxaX8ntdZINUx1HLO3lA5QmkGmJhouOc47xGHM3AgMBAAECgYEAuDuVBNY+icWXn2RokKwang5xWxtkNKUc9YY2AwKPaeYgG0CB8xmlA/S2QAVAmc/oUI2FhCCLHroErp9I9qS1Xu4KlvjcrSs2dJ1/ntijXolLsH+wqjQQ4XWN/eXNpcVP75sl3qH0naE7iLtLkfaVeWQXAb13TG7ctK6BibdpNYECQQD9DEEYfJplF6gRNpVGD1U4h7fNx5vGg0tFwvcWEKL6rs9JFDm7m9CeeLGx2zYjW9zAqzuQsKM+z/zmP21W9gGjAkEA7svqVo8GFvib7y743OSuGsnTXdfyXiNmJCZEFXtf02uO0LYMRSUv4/YuJ/Vk7VQR5RV0RN98HItMifv1HZppXQJAC0o8rUcB7Hi9uubgihutBbSocrnxLU42UYp9U7KyUtTx0qTgXop5KFjiNLk/FRzIIKCDK9V1sxu8gNlbm4GmWQJBAMiDJVRlaCGlw5oFgSZKRv9rdTYZfAQcCUpVb1nybLZkXFlYY9kzrpDmSD95SLQXoacQar7iQZ7eQPikPmALJmkCQQCzOF5zVkbWEVGe75GW4TwrSC8FYnmQF688UsuRTQBghEvykESkDmbkNLx10z73uYSB+kyu5YA/2dh05IYk6tNp");

    public final String oidPartner;//企业商户号
    public final String shRsaPrivate;//私钥

    OidPartnerRsaEnum(String oidPartner, String shRsaPrivate) {
        this.oidPartner = oidPartner;
        this.shRsaPrivate = shRsaPrivate;
    }

    /**
     * 通过编码可以获取对应的名称
     *
     * @param key
     * @return
     */
    public static String getValueByKey(String key) {
        if (StringUtils.isBlank(key)) {
            return null;
        }
        String tName = null;
        for (OidPartnerRsaEnum em : values()) {
            if (key.equals(em.oidPartner)) {
                tName = em.shRsaPrivate;
                break;
            }
        }
        return tName;
    }
}